import { createApp, h } from 'vue';
import App from './App.vue';
import VueUse from './components/vueuse/index.vue'

const routes = {
  '/': App,
  '/vueuse': VueUse
}

const SimpleRouter = {
  data: () => ({
    currentRoute: window.location.pathname
  }),

  computed: {
    CurrentComponent() {
      return routes[this.currentRoute]
    }
  },

  render() {
    return h(this.CurrentComponent)
  }
}

createApp(SimpleRouter).mount('#app');
